package com.sinping.qh.dto.base;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

/**
 * @author zhangjin
 * @create 2018/5/30
 */
@Data
public class BaseDTO {

    /**
     * id
     */
    @JsonProperty(value = "id")
    private String id;


    /**
     * 创建时间
     */
    @Field("gmt_created")
    @JsonProperty(value = "gmt_created")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date gmtCreated;

    /**
     * 更新时间
     */
    @Field("gmt_modified")
    @JsonProperty(value = "gmt_modified")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date gmtModified;
}
